﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="wuc_edit_profile_dept.ascx.cs"
    Inherits="CarLoanSystemWeb.Page.EditProfile.wuc_edit_profile_dept" %>
<%@ Register Assembly="AjaxValidationSummary" Namespace="AjaxValidationSummary" TagPrefix="cc4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<style type="text/css">
    .style5
    {
        font-size: small;
    }
    .style6
    {
        width: 175px;
        font-size: small;
    }
    .style20
    {
        width: 140px;
        height: 5px;
    }
    .style21
    {
        width: 7px;
        height: 5px;
    }
    .style22
    {
        height: 5px;
    }
    .style23
    {
        width: 140px;
        height: 19px;
    }
    .style24
    {
        width: 7px;
        height: 19px;
    }
    .style25
    {
        height: 19px;
    }
</style>
<script type="text/javascript" language="javascript">
    function ValidateText(i) {
        if (i.value.length > 0) {
            i.value = i.value.replace(/[^\d+.\d*$]+/g, '');
        }
        var pattern = /^\d+.?\d*$/;
        var str = i.value;
        if (str.match(pattern) == null) {
            alert("กรุณากรอกข้อมูลให้ถูกต้อง");
            i.value = "0";
        }
    }
</script>
<div id="box_content">
    <div id="box_content_head">
        <h1>
            ข้อมูลภาระหนี้สิน
        </h1>
    </div>
    <div id="box_content_body">
        <table style="height: 218px; width: 779px">
            <tr>
                <td class="style23">
                    <span class="style5">จำนวณเงิน</span>
                </td>
                <td class="style24">
                    :
                </td>
                <td class="style25">
                    <asp:TextBox ID="txtDeptMoney" runat="server" MaxLength="100" Width="251px" onkeyup="ValidateText(this);"
                        Style="margin-left: 0px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="กรุณาระบุจำนวณเงิน"
                        CssClass="validation" ValidationGroup="valOfficer" ControlToValidate="txtDeptMoney">*</asp:RequiredFieldValidator>
                    <span class="style5">บาท</span>
                </td>
            </tr>
            <tr>
                <td class="style23">
                    <span class="style5">รายละเอียดภาระหนี้สิน</span>
                </td>
                <td class="style24">
                    :
                </td>
                <td class="style25">
                    <asp:TextBox ID="txtDetail" runat="server" MaxLength="100" Width="372px" Style="margin-left: 0px"
                        Height="144px" TextMode="MultiLine"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="กรุณาระบุรายละเอียดภาระหนี้สิน"
                        CssClass="validation" ValidationGroup="valOfficer" ControlToValidate="txtDetail">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style23">
                    <span class="style5">สถานะ</span>
                </td>
                <td class="style24">
                    :
                </td>
                <td class="style25">
                    <asp:DropDownList ID="ddlStatus" runat="server" Height="24px" Width="247px">
                        <asp:ListItem Value="A">ใช้งาน</asp:ListItem>
                        <asp:ListItem Value="B">ไม่ใช้งาน</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
    </div>
    <div id="box_content_footer">
    </div>
    <div id="list" runat="server">
    </div>
    <div class="action" style="margin-top: 15px">
        <asp:HyperLink ID="hplBack" runat="server" CssClass="button cancel" NavigateUrl="~/Page/EditProfile/EditProfilePage.aspx">ยกเลิก</asp:HyperLink>
        <asp:LinkButton ID="btnSave" runat="server" ValidationGroup="valOfficer" CssClass="button save"
            OnClick="btnSave_Click">บันทึก</asp:LinkButton>
        <ajaxToolkit:ConfirmButtonExtender ID="btnSave_ConfirmButtonExtender" runat="server"
            ConfirmText="ต้องการจะบันทึกหรือไม่" Enabled="True" TargetControlID="btnSave">
        </ajaxToolkit:ConfirmButtonExtender>
    </div>
</div>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" CssClass="validation_sum"
    ValidationGroup="valOfficer" ShowMessageBox="True" ShowSummary="False" />
